package behavioralPattern.interpret.example02;

/**
 * 乘法运算
 */
public class MulExpression implements Expression{

    private Expression exp_1;
    private Expression exp_2;

    public MulExpression(Expression exp_1, Expression exp_2) {
        this.exp_1 = exp_1;
        this.exp_2 = exp_2;
    }

    @Override
    public long interpret() {
        return exp_1.interpret() * exp_2.interpret();
    }
}
